/*
 * @Description: 
 * @Author: liuzl
 * @Date: 2024-09-05 20:00:57
 * @LastEditors: liuzl
 * @LastEditTime: 2024-09-05 20:01:01
 */
public class Test09{
    public static int getIndex(int num,int[] a){
        int result = 0;
        for(int i = 0; i < a.length ;i++){
            if(a[i]>num){
                result = i;
                break;
            }
            else{
                result = -1;
            }
        }
        return result;
    }
    public static void main(String[] args){
        int[] a = {1,5,9,15,26};
        int num = 30;
        int m = getIndex(num,a);
        System.out.println(m);
    }
}